package com.define.ssh.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/***
 * 告警表
 * @author sc
 *
 */
@Entity
@Table(name = "m_alart_detail")
public class MAlartDetail implements java.io.Serializable {

	// Fields

	private Integer targetid;
	private Integer netid;
	private Integer warnlevel;
	private String warnresult;
	private Date updatetime;
	
	private String pname;//网元名称

	// Constructors

	/** default constructor */
	public MAlartDetail() {
	}

	/** full constructor */
	public MAlartDetail(Integer targetid, Integer netid, Integer warnlevel,
			String warnresult, Date updatetime) {
		this.targetid = targetid;
		this.netid = netid;
		this.warnlevel = warnlevel;
		this.warnresult = warnresult;
		this.updatetime = updatetime;
	}

	// Property accessors
	@Id
	@Column(name = "targetid", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getTargetid() {
		return this.targetid;
	}

	public void setTargetid(Integer targetid) {
		this.targetid = targetid;
	}

	@Column(name = "netid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getNetid() {
		return this.netid;
	}

	public void setNetid(Integer netid) {
		this.netid = netid;
	}

	@Column(name = "warnlevel", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getWarnlevel() {
		return this.warnlevel;
	}

	public void setWarnlevel(Integer warnlevel) {
		this.warnlevel = warnlevel;
	}

	@Column(name = "warnresult", unique = false, nullable = false, insertable = true, updatable = true, length = 500)
	public String getWarnresult() {
		return this.warnresult;
	}

	public void setWarnresult(String warnresult) {
		this.warnresult = warnresult;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updatetime", unique = false, nullable = false, insertable = true, updatable = true, length = 19)
	public Date getUpdatetime() {
		return this.updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}
	@Transient
	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	
	
	
}